﻿using Basic.FlowGatewayModule.Interface;
using Basic.FlowRemoteModel.NodeFormPower;
using Basic.FlowRemoteModel.NodeFormPower.Model;

namespace Basic.FlowGatewayModule.lmpl
{
    internal class NodeFormPowerService : INodeFormPowerService
    {
        public FormColPower[] Gets ( long nodeId )
        {
            return new GetsNodeFormPower
            {
                NodeId = nodeId
            }.Send();
        }

        public void Sync ( long flowId, long nodeId, FormColPower[] powers )
        {
            new SetNodeFormPower
            {
                NodeId = nodeId,
                FlowId = flowId,
                Powers = powers
            }.Send();
        }
    }
}
